package com.prs.crm.dao.assets.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.assets.AssetsBigClassDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.assets.AssetsBigClass;

public class AssetsBigClassDaoImpl extends BaseDaoImpl<AssetsBigClass> 
				implements AssetsBigClassDao{

	@Override
	public List<AssetsBigClass> getAllBigClass() {
		Criteria cri = this.getSession().createCriteria(AssetsBigClass.class);
		return cri.list();
	}

	@Override
	public AssetsBigClass getBigByid(Integer id) {
		Criteria cri = this.getSession().createCriteria(AssetsBigClass.class)
						.add(Restrictions.eq("id", id));
		return (AssetsBigClass) cri.list().get(0);
	}

}
